package principle.singleResponsibility;

/*
    单一职责原则的原始案例
    Vehicle是交通工具，但是交通工具太广，可能有水陆空三种情况
 */
public class Demo01 {
    public static void main(String[] args) {
        Vehicle vehicle = new Vehicle();
        vehicle.run("车");
        vehicle.run("飞机");
        vehicle.run("轮船");
    }
}
class Vehicle{
    public void run(String name){
        System.out.println(name+"在运行...");
    }
}

